﻿using Learun.Util;
using SqlSugar;
using System;
namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
    /// <summary>
    /// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
    /// Copyright (c) 2013-2018 Hexagon PPM
    /// 创 建：超级管理员
    /// 日 期：2022-06-01 15:08
    /// 描 述：通知
    /// </summary>
    [SugarTable(TableName = "ec_notification")]
    public class ec_notificationEntity
    {
        #region 实体成员
        /// <summary>
        /// ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string ID { get; set; }
        /// <summary>
        /// 发送者的用户id
        /// </summary>
        public string SenderUserID { get; set; } = "";
        /// <summary>
        /// 接收者的用户真实名字
        /// </summary>
        public string RetrieveUserID { get; set; } = "";
        /// <summary>
        /// 具体的实体ID
        /// </summary>
        public string DrawingSynID { get; set; } = "";

        /// <summary>
        /// 是否被批准(是否看过)。0为没有。1为确认了
        /// </summary>
        public int CheckFLG { get; set; }

        /// <summary>
        /// 确认时间
        /// </summary>
        public string CheckTime { get; set; } = "";
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserID { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更新人
        /// </summary>
        public string UpdateUserID { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        #endregion

        #region 扩展操作
        /// <summary>
        /// 新增调用
        /// </summary>
        public void Create()
        {
            this.ID = Guid.NewGuid().ToString();
            this.CreateTime = Time.MySqlTime;
            UserInfo userInfo = LoginUserInfo.Get();
            this.CreateUserID = userInfo.userId;
        }
        /// <summary>
        /// 编辑调用
        /// </summary>
        /// <param name="keyValue"></param>
        public void Modify(string keyValue)
        {
            this.ID = keyValue;
            this.UpdateTime = Time.MySqlTime;
            UserInfo userInfo = LoginUserInfo.Get();
            this.UpdateUserID = userInfo.userId;
        }
        #endregion
        #region 扩展字段
        /// <summary>
        /// ec drawing syn中的备注
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string Remark { get; set; }

        /// <summary>
        /// ec drawing file中的ID
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string DrawingID { get; set; }

        /// <summary>
        /// ec drawing file中的Name
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string DrawingName { get; set; }
        #endregion
    }
}

